package rabbitMQ.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import config.ProducerConsumerConfig;
import po.Mail;

/**
 * myqueue队列监听器2
 * 
 * @author super
 *
 */
@Component
public class QueueListener2 {

	@RabbitListener(queues = ProducerConsumerConfig.QUERY_NAME)
	public void displayMail(Mail mail) throws Exception {
		System.out.println("myqueue队列监听器2号收到消息" + mail.toString());
	}
}
